package com.threeonemeeting.list;

import java.util.ArrayList;

import com.threeonemeeting.model.UserInfo;

public class UserInfoList {

	public ArrayList<UserInfo> users = new ArrayList<UserInfo>();

	public void addUserInfo(UserInfo info) {
		for (int i = 0; i < users.size(); i++) {
			UserInfo aInfo = users.get(i);
			if (aInfo == null)
				continue;

			if (aInfo.nUserId == info.nUserId)
				return;
		}

		users.add(info);
	}

	public void deleteUserInfo(int nUserId) {
		for (int i = 0; i < users.size(); i++) {
			UserInfo aInfo = users.get(i);
			if (aInfo == null)
				continue;

			if (aInfo.nUserId == nUserId) {
				users.remove(i);
				return;
			}
		}
	}
}
